# Contributor: Jelle van der Waa <jelle@vdwaa.nl>
# Contributor: Urs Wolfer <uwolfer @ fwo.ch>

pkgname=ttf-droid
pkgver=20121017
pkgrel=10
pkgdesc="General-purpose fonts released by Google as part of Android"
arch=('any')
license=('Apache')
url='https://www.droidfonts.com/'
provides=('ttf-font')
source=("https://sources.archlinux.org/other/community/$pkgname/$pkgname-$pkgver.tar.xz"
        65-droid-{kufi,sans,sans-mono,serif}.conf)
sha256sums=('f068efec9e8201fe0d1be75b1a4751c98d14dc44267b2237f549403b2a8069e3'
            'fc208932ae52bc678415b66b2fa958d24d6100f2d9609d5564c611b3c53b38c7'
            '93a0dc8e3258be4fafa68df120add114018bb723af7c0d61b60c6d908fcd87b2'
            '42da7d1ac6d7055971c8b1bb98a83e893fbed621534b04247a5f6ed89ca14d44'
            '311c79e55fc58e83f066377393e59865518dcbe09b51e5fe3459b69fbac3b6af')

package() {
  # Install fonts
  install -Dt "$pkgdir/usr/share/fonts/${pkgname#ttf-}" -m644 \
    google-droid-fonts-$pkgver/*.ttf

  # Install fontconfig
  local fcdir="$pkgdir/usr/share/fontconfig"
  install -Dt "$fcdir/conf.avail" -m644 *.conf
  mkdir -p "$fcdir/conf.default"
  ln -srt "$fcdir/conf.default" "$fcdir"/conf.avail/*
}

# vim:set sw=2 et:
